/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.sys.service;

import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.sys.dao.LicenseDao;
import com.thinkgem.jeesite.modules.sys.entity.LicenseKey;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 区域Service
 * @author ThinkGem
 * @version 2014-05-16
 */
@Service
@Transactional(readOnly = true)
public class LicenseService extends CrudService<LicenseDao, LicenseKey>{

    @Transactional(readOnly = false)
    public int insertId(String licenseId){
        return dao.insertId(licenseId);
    }

    @Transactional(readOnly = false)
    public int update(LicenseKey licenseKey){
        Global.setLicense(licenseKey);
        return dao.update(licenseKey);
    }
}
